import React, {useEffect, useState} from "react";
import {Button} from "antd";
import http from "@/common/http";
import {LOGIN_INFO} from "@/common/constant";

const Oauth: React.FC<any> = (props) => {

  const handleOauthLogin = () => {
    window.location.href = 'http://127.0.0.1:9081/auth/oauth/authorize?client_id=clientapp&response_type=code&redirect_url=http://127.0.0.1:3001/callback'
    // window.location.href = 'gateway/auth/oauth/authorize?client_id=clientapp&response_type=code&redirect_url=http://127.0.0.1:3000/callback'
  }

  return (
    <div>
      <Button size="large" style={{marginLeft: 8}} onClick={handleOauthLogin}>
        oauth登陆
      </Button>
    </div>
  )
}

export default Oauth
